package com.mwm.paiwei.meiye.activity;

import android.os.Bundle;
import android.support.v7.widget.RecyclerView;

import com.lianjiao.core.activity.BaseActivity;
import com.mwm.paiwei.meiye.model.LoginBean;
import com.mwm.paiwei.meiye.R;
import com.mwm.paiwei.meiye.adapter.CharactorSelectAdapter;
import com.mwm.paiwei.meiye.util.CustomLinearLayoutManager;

import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;

public class CharactorSelectActivity extends BaseActivity {

    @BindView(R.id.select_recycle)
    RecyclerView selectRecycle;

    private LoginBean loginBean;
    private List<LoginBean.DataBean.UserTokensBean> userTokens;
    private CharactorSelectAdapter adapter;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_charactor_select);
        ButterKnife.bind(this);

        if(getIntent() != null){
            loginBean = (LoginBean) getIntent().getSerializableExtra("loginBean");
            userTokens = loginBean.getData().getUserTokens();
        }

        adapter = new CharactorSelectAdapter(this,userTokens);
        selectRecycle.setLayoutManager(new CustomLinearLayoutManager(this));

        selectRecycle.setAdapter(adapter);
    }
}
